import os
from datetime import datetime
from flask import Flask, request, flash, url_for, redirect, \
    render_template, abort, send_from_directory
from views.chartView import chartView
from views.webComponentView import webComponentView

app = Flask(__name__)
app.config.from_pyfile('flaskapp.cfg')

app.register_blueprint(chartView)
app.register_blueprint(webComponentView)

@app.route('/')
def index():
    return render_template('index.html')


@app.route('/<path:resource>')
def serveStaticResource(resource):
    return send_from_directory('static/', resource)


@app.route("/test1")
def test():
    return "<strong>It's Alive!</strong>"


if __name__ == '__main__':
    app.run(debug=True)
